﻿using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogComment;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogDevelopHistory;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogGlobalConfig;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogLogin;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogMenu;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogProjectCase;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogTeamMember;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogText;
using AnQinFrameWorkAPI.Entity.Blog.DTO.BlogUser;
using AnQinFrameWorkAPI.Entity.Blog.Entity;
using AutoMapper;

namespace AnQinFrameWorkAPI.Common.Mapper;

public class BlogMapper : Profile
{
    public BlogMapper()
    {
        /**
        * 博客
         */
        //博客用户
        CreateMap<BlogUserAddDTO, BlogUserModel>();
        CreateMap<BlogUserUpdateDTO, BlogUserModel>();
        CreateMap<BlogRegisterDTO, BlogUserModel>();

        //博客评论
        CreateMap<BlogCommentAddDTO, BlogCommentModel>();
        CreateMap<BlogCommentUpdateDTO, BlogCommentModel>();

        //博客发展历程
        CreateMap<BlogDevelopHistoryAddDTO, BlogDevelopHistoryModel>();
        CreateMap<BlogDevelopHistoryUpdateDTO, BlogDevelopHistoryModel>();

        //博客全局配置
        CreateMap<BlogGlobalConfigAddDTO, BlogGlobalConfigModel>();
        CreateMap<BlogGlobalConfigUpdateDTO, BlogGlobalConfigModel>();

        //博客菜单
        CreateMap<BlogMenuAddDTO, BlogMenuModel>();
        CreateMap<BlogMenuUpdateDTO, BlogMenuModel>();

        //博客项目案例
        CreateMap<BlogProjectCaseAddDTO, BlogProjectCaseModel>();
        CreateMap<BlogProjectCaseUpdateDTO, BlogProjectCaseModel>();

        //博客团队成员
        CreateMap<BlogTeamMemberAddDTO, BlogTeamMemberModel>();
        CreateMap<BlogTeamMemberUpdateDTO, BlogTeamMemberModel>();

        //博客文章
        CreateMap<BlogTextAddDTO, BlogTextModel>();
        CreateMap<BlogTextUpdateDTO, BlogTextModel>();
    }
}